home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol2 / snip_16millioncolours.dba < prev    next >
Encoding:
Text File  |  2000-08-20  |  732 b   |  39 lines

  1. `    ------------------------------------------------------------------------
  2. `    16.7 Million Colours                       DarkForge Snippet (20/8/2000)
  3. `    ------------------------------------------------------------------------
  4. `    Displays all possible colour combinations (using a 4-step increment)
  5. `    Code by ShaLLow and Requiem
  6.  
  7. sync rate 0
  8. sync on
  9. hide mouse
  10.  
  11. for r=1 to 255 step 4
  12.     for g=1 to 255 step 4
  13.         for b=1 to 255 step 4
  14.             ink rgb(r,g,b),0
  15.  
  16.             dot x,y
  17.  
  18.             inc x
  19.  
  20.             if x=640
  21.                 x=0
  22.                 inc y
  23.                 sync
  24.                 if y=480
  25.                     y=0
  26.                 endif
  27.             endif
  28.  
  29.         next b
  30.     next g
  31. next r
  32.  
  33. ink rgb(255,255,255),0
  34. set cursor 0,464 : print "RGB Colour Spectrum 16.7 Million Colours, 4-Stepped"
  35.  
  36. wait key
  37. end
  38.  
  39.